package com.example.androidsx;

import java.io.Serializable;

public class Product implements Serializable {
    public final String name;
    private final String price;
    private final String description;
    private final String imageName;
    private int quantity;

    public Product(String name, String price, String description, String imageName) {
        this.name = name;
        this.price = price;
        this.description = description;
        this.imageName = imageName;
        this.quantity = 0;
    }

     //拷贝构造函数
    public Product(Product other) {
        this.name = other.name;
        this.price = other.price;
        this.description = other.description;
        this.imageName = other.imageName;
        this.quantity = other.quantity;
    }

    public String getName() {
        return name;
    }

    public String getPrice() {
        return price;
    }

    public String getDescription() {
        return description;
    }

    public String getImageName() {
        return imageName;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
}